package RestaurantManagement;

import java.util.ArrayList;

public class Meal implements Priceable {
    private String name;
    private ArrayList<Ingredient> ingredients;

    public Meal(String name, ArrayList<Ingredient> ingredients) {
        this.name = name;
        this.ingredients = new ArrayList<>(ingredients);
    }

    @Override
    public double getPrice() {
        return ingredients.stream().mapToDouble(Priceable::getPrice).sum();
    }

    public String getName() {
        return name;
    }

    public ArrayList<Ingredient> getIngredients() {
        return new ArrayList<>(ingredients);
    }

    public int size() {
        return 0;
    }
}